﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Sgr.UPMS.Application.Services
{
    public interface IUpmsSummaryService
    {
        /// <summary>
        /// 获取系统总用户数
        /// </summary>
        /// <param name="cancellationToken">取消令牌</param>
        /// <returns>系统总用户数</returns>
        Task<int> GetTotalUserCountAsync(CancellationToken cancellationToken = default);

        /// <summary>
        /// 获取系统总企业数
        /// </summary>
        /// <param name="cancellationToken">取消令牌</param>
        /// <returns>系统总企业数</returns>
        Task<int> GetTotalEnterpriseCountAsync(CancellationToken cancellationToken = default);

        /// <summary>
        /// 获取当前在线用户数（基于有效的刷新令牌）
        /// </summary>
        /// <param name="cancellationToken">取消令牌</param>
        /// <returns>当前在线用户数</returns>
        Task<int> GetCurrentOnlineUserCountAsync(CancellationToken cancellationToken = default);

        /// <summary>
        /// 获取当前在线会话数（基于有效的刷新令牌）
        /// </summary>
        /// <param name="cancellationToken">取消令牌</param>
        /// <returns>当前在线会话数</returns>
        Task<int> GetCurrentOnlineSessionCountAsync(CancellationToken cancellationToken = default);

        /// <summary>
        /// 获取指定时间范围内的日活用户数
        /// </summary>
        /// <param name="start"></param>
        /// <param name="end"></param>
        /// <param name="cancellationToken">取消令牌</param>
        /// <returns></returns>
        Task<int> GetActivityUserCount(DateTime start, DateTime end, CancellationToken cancellationToken = default);
    }
}